% !TeX root = ./main.tex

\ustcsetup{
  title              = {隐私保护场景下的多源密态数据\\分析方法研究},
  title*             = {A Study of Multi-Source Encrypted Data Analysis Methods in Privacy-Preserving Scenarios},
  author             = {朱滨},
  author*            = {Zhu Bin},
  speciality         = {网络空间安全},
  speciality*        = {Cyberspace Security},
  supervisor         = {薛开平~教授},
  supervisor*        = {Prof.\ Kaiping Xue},
  % date               = {2017-05-01},  % 默认为今日
  % professional-type  = {专业学位类型},
  % professional-type* = {Professional degree type},
  % department         = {数学科学学院},  % 院系，本科生需要填写
  % student-id         = {PB11001000},  % 学号，本科生需要填写
  % secret-level       = {秘密},     % 绝密|机密|秘密|控阅，注释本行则公开
  % secret-level*      = {Secret},  % Top secret | Highly secret | Secret
  % secret-year        = {10},      % 保密/控阅期限
  % reviewer           = true,      % 声明页显示“评审专家签名”
  %
  % 数学字体
  % math-style         = GB,  % 可选：GB, TeX, ISO
  math-font          = xits,  % 可选：stix, xits, libertinus
}


% 加载宏包

% 定理类环境宏包
\usepackage{amsthm}

% 插图
\usepackage{graphicx}

% 三线表
\usepackage{booktabs}

% 表注
\usepackage{threeparttable}

% 跨页表格
\usepackage{longtable}

% 算法
\usepackage[ruled,linesnumbered]{algorithm2e}

% SI 量和单位
\usepackage{siunitx}

% 参考文献使用 BibTeX + natbib 宏包
% 顺序编码制
\usepackage[sort]{natbib}
\bibliographystyle{ustcthesis-numerical}

% 著者-出版年制
% \usepackage{natbib}
% \bibliographystyle{ustcthesis-authoryear}

% 本科生参考文献的著录格式
% \usepackage[sort]{natbib}
% \bibliographystyle{ustcthesis-bachelor}

% 参考文献使用 BibLaTeX 宏包
% \usepackage[style=ustcthesis-numeric]{biblatex}
% \usepackage[bibstyle=ustcthesis-numeric,citestyle=ustcthesis-inline]{biblatex}
% \usepackage[style=ustcthesis-authoryear]{biblatex}
% \usepackage[style=ustcthesis-bachelor]{biblatex}
% 声明 BibLaTeX 的数据库
% \addbibresource{bib/ustc.bib}

% 配置图片的默认目录
\graphicspath{{figures/}}

% 数学命令
\makeatletter
\newcommand\dif{%  % 微分符号
  \mathop{}\!%
  \ifustc@math@style@TeX
    d%
  \else
    \mathrm{d}%
  \fi
}
\makeatother
\newcommand\eu{{\symup{e}}}
\newcommand\iu{{\symup{i}}}

% 用于写文档的命令
\DeclareRobustCommand\cs[1]{\texttt{\char`\\#1}}
\DeclareRobustCommand\env[1]{\texttt{#1}}
\DeclareRobustCommand\pkg[1]{\textsf{#1}}
\DeclareRobustCommand\file[1]{\nolinkurl{#1}}

% hyperref 宏包在最后调用
\usepackage{hyperref}


% zhubin
\usepackage{cleveref}
% \crefname{figure}{图}{图}
% \crefname{table}{表}{表}
% \crefname{algorithm}{算法}{算法}

\crefname{equation}{式}{式}
\crefname{figure}{图}{图}
\crefname{table}{表}{表}
\crefname{page}{页}{页}
\crefname{chapter}{章}{章}
\crefname{section}{节}{节}
% \crefname{paragraph}{节}{节}
\crefname{appendix}{附录}{附录}
\crefname{theorem}{定理}{定理}
\crefname{lemma}{引理}{引理}
\crefname{corollary}{推论}{推论}
\crefname{proposition}{命题}{命题}
\crefname{definition}{定义}{定义}
\crefname{example}{例}{例}
\crefname{algorithm}{算法}{算法}
\crefname{listing}{列表}{列表}
\crefname{line}{行}{行}

\crefformat{chapter}{第#2#1#3章}
\crefformat{section}{第#2#1#3节}
\crefformat{subsection}{第#2#1#3节}
\crefformat{subsubsection}{第#2#1#3节}
\crefformat{line}{第#2#1#3行}

\crefrangeformat{chapter}{第#3#1#4章至第#5#2#6章}
\crefrangeformat{section}{第#3#1#4节至第#5#2#6节}
\crefrangeformat{subsection}{第#3#1#4节至第#5#2#6节}
\crefrangeformat{subsubsection}{第#3#1#4节至第#5#2#6节}

\crefmultiformat{chapter}{第#2#1#3章}{和第#2#1#3章}{，第#2#1#3章}{和第#2#1#3章}
\crefmultiformat{section}{第#2#1#3节}{和第#2#1#3节}{，第#2#1#3节}{和第#2#1#3节}
\crefmultiformat{subsection}{第#2#1#3节}{和第#2#1#3节}{，第#2#1#3节}{和第#2#1#3节}
\crefmultiformat{subsubsection}{第#2#1#3节}{和第#2#1#3节}{，第#2#1#3节}{和第#2#1#3节}

\crefrangemultiformat{chapter}{第#3#1#4章至第#5#2#6章}{和第#3#1#4章至第#5#2#6章}{，第#3#1#4章至第#5#2#6章}{和第#3#1#4章至第#5#2#6章}
\crefrangemultiformat{section}{第#3#1#4节至第#5#2#6节}{和第#3#1#4节至第#5#2#6节}{，第#3#1#4节至第#5#2#6节}{和第#3#1#4节至第#5#2#6节}
\crefrangemultiformat{subsection}{第#3#1#4节至第#5#2#6节}{和第#3#1#4节至第#5#2#6节}{，第#3#1#4节至第#5#2#6节}{和第#3#1#4节至第#5#2#6节}
\crefrangemultiformat{subsubsection}{第#3#1#4节至第#5#2#6节}{和第#3#1#4节至第#5#2#6节}{，第#3#1#4节至第#5#2#6节}{和第#3#1#4节至第#5#2#6节}

\newcommand{\crefpairconjunction}{~和~}
\newcommand{\crefmiddleconjunction}{, }
\newcommand{\creflastconjunction}{~和~}
\newcommand{\crefpairgroupconjunction}{~和~}
\newcommand{\crefmiddlegroupconjunction}{, }
\newcommand{\creflastgroupconjunction}{~和~}
\newcommand{\crefrangeconjunction}{~至~}


\SetKwInput{Input}{\textbf{输入}}
\SetKwInput{Output}{\textbf{输出}}
\SetKwInput{Preprocessing}{\textbf{预处理}}
\SetKwInput{Online}{\textbf{在线}}
\SetKwInput{Computation}{\textbf{计算}}

\usepackage{subcaption}

\usepackage{tikz}
\usetikzlibrary{math}
\usetikzlibrary{positioning, calc, decorations.pathreplacing}

\usepackage{stmaryrd}

\usepackage{chapters/commands} 